module.exports = {
  env: {
    baseUrl: process.env.BASE_URL || 'http://localhost:3000'
  },
  /*
  ** Headers of the page
  */
  head: {
    title: '前端摆渡人',
    meta: [
      { name: 'keywords', content: '前端摆渡人，关注Web前端开发，web前端开发博客，前端开发教程，前端开发技术，网站前端开发 ，移动web前端开发，前端技术博客' },
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no' },
      { hid: 'description', name: 'description', content: '前端摆渡人| 关注Web前端开发 实时更新最新前端开发技术，为用户提供各种最实用的前端开发教程、前端开发资源和前端开发经验分享，让每个前端都能用最简单的方法,快速地编写出高效、易维护、易扩展的模块化代码，网站集成了前端技术、学习教程、框架学习、资源分享、音乐电台。' },
      /*优先使用 IE 最新版本和 Chrome  */
      { name: 'renderer', content: 'webkit' },
      { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' },
      /* iOS 设备 */
      { name: 'author', content: '前端摆渡人,13991104074@163.com' },
      { name: 'apple-mobile-web-app-title', content: '前端摆渡人' },
      { name: 'apple-mobile-web-app-capable', content: 'yes' },
      { name: 'apple-mobile-web-app-status-bar-style', content: '#263238' },
      /*fullscreen and app mode*/
      { name: 'screen-orientation', content: 'portrait' },
      { name: 'x5-orientation', content: 'portrait' },
      { name: 'full-screen', content: 'yes' },
      { name: 'x5-fullscreen', content: 'true' },
      { name: 'browsermode', content: 'application' },
      { name: 'x5-page-mode', content: 'app' },
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#fff' },

  /*
  ** Global CSS
  */
  css: [
    '~/assets/css/lib/reset.css',
    'element-ui/lib/theme-chalk/index.css',
    '~/assets/css/element.scss',
    '~/assets/icon/iconfont.css',
    '~/assets/css/lib/yeh-md-theme.css',
    '~/assets/css/lib/ocean.min.css'
  ],
  /*
  ** Plugins to load before mounting the App
  */
  plugins: [
    '@/plugins/element-ui',
    '@/plugins/axios',
    '@/plugins/main'
  ],
  loading: {
    color: '#04acf7',
    height: '4px',
    failedColor: 'red'
  },
  //配置路由
  router: {
    middleware: 'adminAuth'
  },
  /*
  ** Nuxt.js modules
  */
  // modules: [
  //   // Doc: https://github.com/nuxt-community/axios-module#usage
  //   '@nuxtjs/axios'
  // ],
  /*
  ** Axios module configuration
  */
  /*
  ** Build configuration
  */
  build: {
    /*
    ** You can extend webpack config here
    */
    extend(config, ctx) {
      // Run ESLint on save
      if (ctx.isDev && ctx.isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        })
      }
    }
  }
}
